import request from '/@/utils/request';
import { AxiosRequestConfig } from 'axios';

//================================================================
// 获取无人机列表 分页查询 /ITS/Drone/QueryPageList
export const DroneQueryPageList = (data?: object) => {
	return request({
		url: '/ITS/Drone/QueryPageList',
		method: 'post',
		data,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 无人机 新增 /ITS/Drone/Add
export const DroneAdd = (params?: object) => {
	return request({
		url: '/ITS/Drone/Add',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 无人机 编辑 /ITS/Drone/Update
export const DroneUpdate = (params?: object) => {
	return request({
		url: '/ITS/Drone/Update',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 无人机 删除 /ITS/Drone/Delete
export const DroneDelete = (params?: object) => {
	return request({
		url: '/ITS/Drone/Delete',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 无人机 启用或禁用设备
export const OpenOrCloseDrone = (params?: object) => {
	return request({
		url: '/ITS/Drone/UpdateDeviceStatus',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

//无人机 详情
export const DroneDetail = (params?: object) => {
	return request({
		url: '/ITS/Drone/GetDetail',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

//无人机 媒体文件
export const QueryMediaPageList = (params?: object) => {
	return request({
		url: '/ITS/Drone/QueryMediaPageList',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 获取设备下拉列表
export const DroneDropDownList = (params?: object) => {
	return request({
		url: '/ITS/Drone/DropDownList',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 手动开启视频流解析
export const ManualResolveStream = (params?: object) => {
	return request({
		url: '/ITS/Drone/ManualResolveStream',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 手动停止视频流解析
export const stopResolveStream = (params?: object) => {
	return request({
		url: '/ITS/Drone/StopResolveStream',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}


// 图片识别
export const ResolveImage = (params?: object) => {
	return request({
		url: '/ITS/Drone/ResolveImage',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 图片批量识别
export const ResolveImageList = (params?: object) => {
	return request({
		url: '/ITS/Drone/BatchResolveImage',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 获取航线下拉列表
export const WaylineDropDownList = (params?: object) => {
	return request({
		url: '/ITS/Drone/WaylineDropDownList',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 获取航线任务分页列表
export const getRouteTaskManagementApi = (data?: object) => {
	return request({
		url: '/ITS/Drone/QueryWaylinePageList',
		method: 'post',
		data,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 新增航线任务管理
export const addRouteTaskManagementApi = (data?: object) => {
	return request({
		url: '/ITS/Drone/AddWayline',
		method: 'post',
		data,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 更新航线任务管理
export const updateRouteTaskManagementApi = (data?: object) => {
	return request({
		url: '/ITS/Drone/UpdateWayline',
		method: 'post',
		data,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 切换航线任务管理
export const activeRouteTaskManagementApi = (params?: object) => {
	return request({
		url: '/ITS/Drone/ChangeWaylineBindType',
		method: 'get',
		data:params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 查看航线任务管理详情
export const queryRouteTaskManagementApi = (params?: object) => {
	return request({
		url: '/ITS/Drone/GetCurrentUseWaylineInfo',
		method: 'get',
		data:params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 删除航线任务管理
export const deleteRouteTaskManagementApi = (data?: object) => {
	return request({
		url: '/ITS/Drone/DeleteWayline',
		method: 'post',
		data,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}